package cn.yjr.vector.a;

import android.database.sqlite.SQLiteDatabase;

import java.util.Map;

import de.greenrobot.dao.AbstractDao;
import de.greenrobot.dao.AbstractDaoSession;
import de.greenrobot.dao.identityscope.IdentityScopeType;
import de.greenrobot.dao.internal.DaoConfig;
import cn.yjr.vector.a.Doctor;
import cn.yjr.vector.a.DoctorDao;
import cn.yjr.vector.a.My_Registration;
import cn.yjr.vector.a.My_RegistrationDao;
import cn.yjr.vector.a.Transaction_Record;
import cn.yjr.vector.a.Transaction_RecordDao;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see de.greenrobot.dao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

    private final DaoConfig doctorDaoConfig;
    private final DaoConfig transaction_RecordDaoConfig;
    private final DaoConfig my_RegistrationDaoConfig;

    private final DoctorDao doctorDao;
    private final Transaction_RecordDao transaction_RecordDao;
    private final My_RegistrationDao my_RegistrationDao;

    public DaoSession(SQLiteDatabase db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig>
            daoConfigMap) {
        super(db);

        doctorDaoConfig = daoConfigMap.get(DoctorDao.class).clone();
        doctorDaoConfig.initIdentityScope(type);

        transaction_RecordDaoConfig = daoConfigMap.get(Transaction_RecordDao.class).clone();
        transaction_RecordDaoConfig.initIdentityScope(type);

        my_RegistrationDaoConfig = daoConfigMap.get(My_RegistrationDao.class).clone();
        my_RegistrationDaoConfig.initIdentityScope(type);

        doctorDao = new DoctorDao(doctorDaoConfig, this);
        transaction_RecordDao = new Transaction_RecordDao(transaction_RecordDaoConfig, this);
        my_RegistrationDao = new My_RegistrationDao(my_RegistrationDaoConfig, this);

        registerDao(Doctor.class, doctorDao);
        registerDao(Transaction_Record.class, transaction_RecordDao);
        registerDao(My_Registration.class, my_RegistrationDao);
    }
    
    public void clear() {
        doctorDaoConfig.getIdentityScope().clear();
        transaction_RecordDaoConfig.getIdentityScope().clear();
        my_RegistrationDaoConfig.getIdentityScope().clear();
    }

    public DoctorDao getDoctorDao() {
        return doctorDao;
    }

    public Transaction_RecordDao getTransaction_RecordDao() {
        return transaction_RecordDao;
    }

    public My_RegistrationDao getMy_RegistrationDao() {
        return my_RegistrationDao;
    }

}
